<?php
$queryStr = (empty($this->query) ? '' : '?' . http_build_query($this->query));
echo '<div class="page">';
echo '<span class="info">Total:' . $this->paginator->getItemCount() . ',</span> ';
if($this->paginator->getFirst() != $this->paginator->getFirstPageInRange()) {
	//第一页
	echo '<a href="' . $this->route->assemble(array($this->page => $this->paginator->getFirst()) + $this->params) . $queryStr . '">' . $this->paginator->getFirst() . '</a>';
}
if($this->paginator->getPrevious()) {
	//上一页
	echo '<a href="' . $this->route->assemble(array($this->page => $this->paginator->getPrevious()) + $this->params) . $queryStr . '">Previous</a>';
}
foreach($this->paginator->getPagesInRange() as $v) {
	if($v == $this->paginator->getCurrentPageNumber()) {
		echo '<span class="current">' . $v . '</span>';
	} else {
		echo '<a href="' . $this->route->assemble(array($this->page => $v) + $this->params) . $queryStr . '">' . $v . '</a>';
	}
}
if($this->paginator->getNext()) {
	//下一页
	echo '<a href="' . $this->route->assemble(array($this->page => $this->paginator->getNext()) + $this->params) . $queryStr . '">Next</a>';
}
if($this->paginator->getLast() != $this->paginator->getLastPageInRange()) {
	//最后一页
	echo '<a href="' . $this->route->assemble(array($this->page => $this->paginator->getLast()) + $this->params) . $queryStr . '">' . $this->paginator->getLast() . '</a>';
}
echo '</div>';
?>